#ifndef CALCULATOR_SERVICE_IMPL_H
#define CALCULATOR_SERVICE_IMPL_H

#include "calculator.pb.h"
#include "calculator.grpc.pb.h"

#include <grpcpp/grpcpp.h>
#include <grpcpp/health_check_service_interface.h>
#include <grpcpp/ext/proto_server_reflection_plugin.h>

using test::Calculator;
using grpc::Server;
using grpc::ServerBuilder;
using grpc::ServerContext;
using grpc::Status;

class CalculatorServiceImpl : public Calculator::Service {
public:
    CalculatorServiceImpl();

    // Service interface
public:
    grpc::Status Add(grpc::ServerContext *context,
                     const test::Params *request,
                     test::Result *response);
    grpc::Status Subtract(grpc::ServerContext *context,
                          const test::Params *request,
                          test::Result *response);
    grpc::Status Multiply(grpc::ServerContext *context,
                          const test::Params *request,
                          test::Result *response);
    grpc::Status Divide(grpc::ServerContext *context,
                        const test::Params *request,
                        test::Result *response);
};

#endif // CALCULATOR_SERVICE_IMPL_H
